import 'package:flutter/material.dart';
import 'package:flutter_saixiaoli/routes.dart';

class Live extends StatelessWidget {
  EdgeInsets pd_ver12 = EdgeInsets.symmetric(horizontal: 12);
  MainAxisAlignment spaceBetween = MainAxisAlignment.spaceBetween;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('相册直播'),
        elevation: 0,
        centerTitle: true,
      ),
      body: SingleChildScrollView(
        child: Container(
          padding: pd_ver12,
          child: Column(
            children: [
              Container(
                width: MediaQuery.of(context).size.width,
                height: 150,
                decoration: BoxDecoration(
                    color: Colors.amber,
                    borderRadius: BorderRadius.circular(5)),
              ),
              Container(
                margin: EdgeInsets.only(top: 15),
                //padding: pd_ver12,

                height: 150,
                child: Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: [
                    Container(
                      child: Text(
                        '2020昆山十公里路跑联赛（周市站）',
                        style: TextStyle(fontSize: 15),
                      ),
                    ),
                    Container(
                      child: Row(
                        mainAxisAlignment: spaceBetween,
                        children: [
                          Container(
                            child: Text(
                              '3366人观看',
                              style: TextStyle(
                                  color: Color.fromRGBO(191, 55, 54, 1)),
                            ),
                          ),
                          Row(
                            children: [
                              Container(
                                margin: EdgeInsets.only(right: 3),
                                child: Icon(
                                  Icons.share,
                                  color: Color.fromRGBO(153, 153, 153, 1),
                                  size: 15,
                                ),
                              ),
                              Container(
                                child: Text(
                                  '分享',
                                  style: TextStyle(
                                      fontSize: 12,
                                      color: Color.fromRGBO(136, 136, 136, 1)),
                                ),
                              )
                            ],
                          )
                        ],
                      ),
                    ),
                    Container(
                      child: Row(
                        children: [
                          Container(
                            margin: EdgeInsets.only(right: 1),
                            child: Icon(
                              Icons.timer,
                              color: Color.fromRGBO(153, 153, 153, 1),
                              size: 15,
                            ),
                          ),
                          Container(
                            child: Text(
                              '2020-11-06',
                              style: TextStyle(
                                  fontSize: 12,
                                  color: Color.fromRGBO(136, 136, 136, 1)),
                            ),
                          )
                        ],
                      ),
                    ),
                    Container(
                      child: Row(
                        children: [
                          Container(
                            child: Icon(
                              Icons.place,
                              color: Color.fromRGBO(153, 153, 153, 1),
                              size: 15,
                            ),
                          ),
                          Container(
                            child: Text(
                              '苏州市',
                              style: TextStyle(
                                  fontSize: 12,
                                  color: Color.fromRGBO(136, 136, 136, 1)),
                            ),
                          )
                        ],
                      ),
                    ),
                    //参赛号码
                    Container(
                      child: Row(
                        children: [
                          Container(
                            width: 140,
                            height: 30,
                            alignment: Alignment.center,
                            padding: EdgeInsets.only(left: 10),
                            child: TextField(
                              decoration: InputDecoration(
                                  hintText: '请输入参赛号码',
                                  hintStyle: TextStyle(fontSize: 12),
                                  border: InputBorder.none,
                                  isCollapsed: true),
                            ),
                            decoration: BoxDecoration(
                                color: Color.fromRGBO(249, 249, 249, 1),
                                borderRadius: BorderRadius.only(
                                    topLeft: Radius.circular(5),
                                    bottomLeft: Radius.circular(5)),
                                border: Border.all(
                                    color: Color.fromRGBO(221, 221, 221, 1))),
                          ),
                          Container(
                            width: 80,
                            height: 30,
                            margin: EdgeInsets.only(right: 15),
                            decoration: BoxDecoration(
                                borderRadius: BorderRadius.only(
                                    topRight: Radius.circular(5),
                                    bottomRight: Radius.circular(5)),
                                gradient: LinearGradient(colors: [
                                  Color.fromRGBO(191, 55, 54, 1),
                                  Color.fromRGBO(211, 80, 79, 1)
                                ])),
                            child: Row(
                              mainAxisAlignment: MainAxisAlignment.center,
                              children: [
                                Container(
                                  child: Icon(
                                    Icons.search,
                                    color: Colors.white,
                                    size: 15,
                                  ),
                                ),
                                Container(
                                  child: Text(
                                    '搜索',
                                    style: TextStyle(
                                        fontSize: 13, color: Colors.white),
                                  ),
                                )
                              ],
                            ),
                          ),
                          Expanded(
                            child: Ink(
                              decoration: BoxDecoration(
                                  gradient: LinearGradient(colors: [
                                    Color.fromRGBO(191, 55, 54, 1),
                                    Color.fromRGBO(211, 80, 79, 1)
                                  ]),
                                  borderRadius: BorderRadius.circular(5)),
                              child: InkWell(
                                onTap: () {
                                  Navigator.pushNamed(context, Routes.face);
                                },
                                child: Container(
                                  height: 30,
                                  child: Row(
                                    mainAxisAlignment: MainAxisAlignment.center,
                                    children: [
                                      Container(
                                        child: Icon(
                                          Icons.person,
                                          color: Colors.white,
                                        ),
                                      ),
                                      Container(
                                        child: Text(
                                          '人脸识别',
                                          style: TextStyle(
                                              color: Colors.white,
                                              fontSize: 13),
                                        ),
                                      )
                                    ],
                                  ),
                                ),
                              ),
                            ),
                          )
                        ],
                      ),
                    )
                  ],
                ),
              )
            ],
          ),
        ),
      ),
    );
  }
}
